﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Enterprise.Framework.DomainModel;
using Enterprise.Framework.DomainModel.Repositories;
using Resto.CostControl.Common.Utility;

namespace Resto.CostControl.Core.Domain.Model
{
    /// <summary>
    /// 项目点成本项
    /// </summary>
    public partial class SiteCostItem : IEntity
    {
         #region 构造函数

        internal SiteCostItem()
        {
            this.ID = IDHelper.CreateNewID();
        }

        #endregion

        #region 私有属性

        private IEntityRepository<SiteCostItem> _Repository;
        private IEntityRepository<SiteCostItem> Repository
        {
            get
            {
                if (_Repository == null)
                    _Repository = RestoCostDomainSession.CurrentSession.CreateEntityRepository<SiteCostItem>();

                return _Repository;
            }
        }

        #endregion

        #region 方法

        internal void Delete()
        {
            this.Repository.Delete(this);
        }

        #endregion
    }

}
